(function($, window) {
	var baseRequest = window.baseRequest;
	var appConfig = window.appConfig;
	var commonTool = window.commonTool;
	var dataManager = window.dataManager;
	var baseUrl = appConfig.v3ServiceUrl + '/ssidmonitor';

	var v3SsidMonitor = window.v3SsidMonitor = {};

	//Add by wangyu
	var service = baseUrl + '/getssidlist?';
	v3SsidMonitor.getService = function(devSN, skipnum, callback) {
		baseRequest.commonGet(service + $.param({
			devSN : devSN,
			skipnum : skipnum,
			bind : "false",
			limitnum : 10
		}),  10000, function(code, data) {
			if(code === 2 || code === 1) {
				return callback(2);
			}
			if(code === 0) {
				if(data == -1 || data.errcode) {
	        		callback(1);
	            } else {
	                callback(0, data.ssidList);
	            }
			}
		});
	}

	//end
	//Add by dongyi
	//获取无线服务列表
	var wirelessConfig = baseUrl + '/getssidinfobrief?';
	v3SsidMonitor.getWirelessConfig = function(devSN,ownerName,nasId,callback) {
		baseRequest.commonGet(wirelessConfig + $.param({
			devSN : devSN,
			ownerName: ownerName,
			nasId: nasId,
			limitnum : 10
		}),  10000, function(code, data) {
			if(code === 2 || code === 1) {
				return callback(2);
			}
			if(code === 0) {
				if(data == -1 || data.errcode) {
	        		callback(1);
	            } else {
	                callback(0, data.ssidList);
	            }
			}
		});
	}
	
	//获取已绑定或未绑定AP列表
	var stBindApList = baseUrl + '/getstbindaplist?';
	v3SsidMonitor.getStBindApList = function(devSN,stName,callback) {
		baseRequest.commonGet(stBindApList + $.param({
			devSN : devSN,
			stName: stName,
//			limitnum : 10
		}),  10000, function(code, data) {
			if(code === 2 || code === 1) {
				return callback(2);
			}
			if(code === 0) {
				if(data == -1 || data.errcode) {
	        		callback(1);
	            } else {
	                callback(0, data);
	            }
			}
		});
	}
	
	//end

	//Add by zhangfuqiang

	//end

	//Add by dingzhibing

	//end

	//Add by wuchengcheng

	//end


})(mui, window);
